package com.android.likeweixin.util;

import android.content.Context;
import android.util.DisplayMetrics;

public class ResolutionUtily {

	/**
	 * 获取屏幕密度 (0.75,1.5,2.0)
	 * 
	 * @param context
	 * @return float
	 * @see [类、类#方法、类#成员]
	 */
	public static float getDensicy(Context context) {
		DisplayMetrics metric = context.getResources().getDisplayMetrics();
		return metric.density;
	}

	/**
	 * 获取屏幕DPI密度(120,150,240) <功能详细描述>
	 * 
	 * @param context
	 * @return int
	 * @see [类、类#方法、类#成员]
	 */

	public static int getDensicyDpi(Context context) {
		DisplayMetrics metric = context.getResources().getDisplayMetrics();
		return metric.densityDpi;
	}

}
